package com.sumainfor.pc.epc.service.impl;

import com.sumainfor.common.util.JsonResult;
import com.sumainfor.common.utlis.PageUtils;
import com.sumainfor.common.utlis.Pager;
import com.sumainfor.pc.epc.dao.AssistantWorkbenchMapper;
import com.sumainfor.pc.epc.feign.Zfeign.ZpcMktFeign;
import com.sumainfor.pc.epc.feign.Zfeign.ZzuulFeign;
import com.sumainfor.pc.epc.service.AssistantWorkbenchService;
import org.apache.commons.collections.MapUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * <p>
 * 工程助理（工作台）
 * <p>
 *
 * @author: Mr.Wang
 * @create: 2019-04-09 10:05
 **/
@Service
public class AssistantWorkbenchServiceImpl implements AssistantWorkbenchService {

    @Autowired
    AssistantWorkbenchMapper assistantWorkbenchMapper;

    @Autowired
    private ZpcMktFeign zpcMktFeign;

    /**
     * <p>
     * 重要状态提醒
     *
     * </p>
     *
     * @author: zhoucong
     * @since:
     */
    @Override
    public JsonResult importantState() {
        JsonResult result = new JsonResult();
        Map<String, Object> params = assistantWorkbenchMapper.getimportantState();
        JsonResult zpcMktResult = zpcMktFeign.getAuditHousingCount();
        Map<String,Object> zpcMktMap = (Map<String, Object>) zpcMktResult.get("result");
        params.put("InspectStateCount",zpcMktMap.get("InspectStateCount"));
        return result.put(params);
    }


}
